//定义一个方法，给定一个数字，计算该数的阶乘
package itTest;
import java.util.Scanner;
public class test3 {
    public static void main(String[] args) {
        jiechengInt();
    }
    public static void jiechengInt() {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个整数：");
        int s = sc.nextInt();
        int sum = 0;
        for (int i = 1; i <= 10; i++) {
            System.out.print(i + "!=");
            int a = 1;
            for (int j = 1; j <= i; j++) {
                if (j < i) {
                    a *= j;
                    System.out.print(j + "*");
                } else {
                    a *= j;
                    System.out.print(j);
                }
            }
            System.out.println("=" + a);
            sum += a;
        }
        System.out.println();
    }
}
